home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / xcmd / rinaldds.sit / Textoid 1.8 (US) / cards.xml < prev    next >
Text File  |  1991-02-15  |  11KB  |  86 lines

  1. card_3055.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>3055</id>
  6.     <filler1>0</filler1>
  7.     <bitmap>BMAP_3273.pbm</bitmap>
  8.     <cantDelete> <false /> </cantDelete>
  9.     <showPict> <true /> </showPict>
  10.     <dontSearch> <false /> </dontSearch>
  11.     <owner>2661</owner>
  12.     <link rel="stylesheet" type="text/css" href="stylesheet_2387.css" />
  13.     <part>
  14.         <id>1</id>
  15.         <type>field</type>
  16.         <visible> <true /> </visible>
  17.         <dontWrap> <false /> </dontWrap>
  18.         <dontSearch> <false /> </dontSearch>
  19.         <sharedText> <false /> </sharedText>
  20.         <fixedLineHeight> <true /> </fixedLineHeight>
  21.         <autoTab> <false /> </autoTab>
  22.         <lockText> <true /> </lockText>
  23.         <rect>
  24.             <left>69</left>
  25.             <top>68</top>
  26.             <right>434</right>
  27.             <bottom>252</bottom>
  28.         </rect>
  29.         <style>scrolling</style>
  30.         <autoSelect> <false /> </autoSelect>
  31.         <showLines> <false /> </showLines>
  32.         <wideMargins> <false /> </wideMargins>
  33.         <multipleLines> <false /> </multipleLines>
  34.         <reservedFamily> 0 </reservedFamily>
  35.         <titleWidth>0</titleWidth>
  36.         <icon>0</icon>
  37.         <textAlign>left</textAlign>
  38.         <font>Geneva</font>
  39.         <textSize>9</textSize>
  40.         <textStyle>plain</textStyle>
  41.         <textHeight>12</textHeight>
  42.         <name></name>
  43.         <script></script>
  44.     </part>
  45.     <part>
  46.         <id>5</id>
  47.         <type>button</type>
  48.         <visible> <true /> </visible>
  49.         <reserved5> 0 </reserved5>
  50.         <reserved4> 0 </reserved4>
  51.         <reserved3> 0 </reserved3>
  52.         <reserved2> 0 </reserved2>
  53.         <reserved1> 0 </reserved1>
  54.         <enabled> <true /> </enabled>
  55.         <rect>
  56.             <left>174</left>
  57.             <top>281</top>
  58.             <right>343</right>
  59.             <bottom>311</bottom>
  60.         </rect>
  61.         <style>roundrect</style>
  62.         <showName> <true /> </showName>
  63.         <highlight> <false /> </highlight>
  64.         <autoHighlight> <true /> </autoHighlight>
  65.         <sharedHighlight> <true /> </sharedHighlight>
  66.         <family>0</family>
  67.         <titleWidth>0</titleWidth>
  68.         <icon>0</icon>
  69.         <textAlign>center</textAlign>
  70.         <font>Chicago</font>
  71.         <textSize>12</textSize>
  72.         <textStyle>plain</textStyle>
  73.         <name>Textoid</name>
  74.         <script>on mouseUpTextoid "Test1",cd fld 1,true,"91,69","red"testError the ResultTextoid "Test2","This is a sample of wrapping text, you can edit me."┬¼,"chicago",12,"285,142,385,242","white,blue"testError the Resultset selectedText of window "Test2" to "11,16"end mouseUpon TestError Whatif What Γëá emptythenbeepanswer Whatexit to HyperCardend ifend TestError</script>
  75.     </part>
  76.     <content>
  77.         <layer>card</layer>
  78.         <id>1</id>
  79.         <text>                                                 Textoid 1.8                                          by Fr├⌐d├⌐ric RINALDI  and the faithfull help of Beno├«t WIDEMANN for WDEF and CDEF resourcesDESCRIPTION------------  Textoid XCMD displays a text windoid.SYNTAX-------       Textoid <WName>[,<text>[,<WStyle>][,<color>] [,<X,Y[,Z,T]>]                  [,<wrap>][,<FName>] [,<FSize>] [,<FStyle>] [,<FAlign>] ]PARAMETERS------------   Only first param is needed. Order of params 3 to 10 doesn't matter, since the XCMD is able to recognize them.   WName is a string giving the windoid name. Many windoids can be opened by using different names.   Text is the text that will be displayed in the windoid.   WStyle is a string defining the window style. Allowed styles are : plain, zoom, roundRect, rect, shadow, windoid, windoidZoom, bigWindoid, bigWindoidZoom, Rinaldoid, RinaldoidZoom (Rinaldoid is the same as windoid, except that it displays the window title). All window styles are floating, except plain, zoom and roundRect. A windoid or Rinaldoid style window will have small scrollbars, while other styles will use standard size. Default is RinaldoidZoom if Rinaldoid WDEF resource is present, windoidZoom if not found.   Color is a one or two items string giving the foreground and background color. For each item, allowed values are the standard colors (black, white, blue, red, yellow, cyan, magenta, green), or a three word string corresponding to red, green and blue values (100 5624 28652).   <X,Y[,Z,T]> will be a point or a rect, and will define position and/or size of the windoid. Coordinated are card-relative. If omitted, windoid will appear with standard size at "0,10".   Wrap is a boolean to wrap (true) or not (false) the text in the windoid. Defazult is true.   FName is a string giving the font that will be used. Default is Geneva.   FSize is a string giving the font size that will be used. Default is 9.   FStyle is an item(s) string giving the font style(s) that will be used (plain, bold, italic, outline, underline, shadow, condense, extend). Default is Plain.   FAlign is a string giving the text alignment that will be used (left,right, center). Default is left.   Using "!" and "?" as parameter will return an online help (resp. copyright and syntax).USING-----   Textoid is stand alone, no linked resource is needed. Meanwhile, this stack contains a WDEF and a CDEF resource that are recognized by the XCMD if present. The WDEF allows to have an enhanced windoid-type window displaying title, while the CDEF is useful to get nice-looking scroll arrows for small scroll bars. So, these resources are optional, and for aesthetic purpose only. If you copy them, their ID can be set to any value but don't change their name. Each window can contain up to 32000 chars.HINT :   If you use a rect ot shadow style window, placing it on a card can simulate a smart double-scroll HyperCard field.   If no rectangle param is used, the size of the window will be set accordingly to the font.   With multiple screens configuration, the windoid will be zoomed on the screen that it lays on.   Version 1.1 adds hyperText feature : clicking on a word in the window sends a "ClicInText" message followed by the clicked word and windoid name. If the clicked word exceeds 230 chars, its last char will be "ΓǪ" to notify the overflow. This message can be trapped using a handler :     on clicInText What,Where       if Where is "Test1" and What is ...     end clicInText   When a windoid is opened, the "openTextoid" message is sent, followed by the windoid name. This allows to define window properties before it is shown, since the message can be trapped using a handler :     on openTextoid Which       if Which is "MyWindow" then...     end openTextoid   When a windoid is closed, the "closeTextoid" message is sent, followed by the windoid name. This message can be trapped using a handler :     on closeTextoid Which       if Which is "MyWindow" then...     end closeTextoid   Relase 1.5 allows now full editing of the text with Cut, Copy, Paste and Erase. One new property, lockText, allows to lock/unlock the content. When a window is created, its text is locked. Like for a field, the content must be locked to accept mouseDown events (thus HyperText). If unlocked, the insertion point will be set at the clickLoc.Shortcut : Command-Click locks the text                Option-Click unlocks the text                Command-A selects the whole text (if unlocked)Caution : Undo is not supported to minimize the needed RAM.   Finally, the selectedText property allows to select any part of the text. When using ΓÇ£set selectedText of window "MyWindow" to "X,Y"ΓÇ¥, the window is brought to the front, the text is automatically unlocked, scrolled to show the insertion point, and you are ready to type in it. You can also get the selectedText when the window is closed using :     on closeTextoid Which       get selectedText of window Which       put char (item 1 of it) to (item 2 of it) of Text of window Which     end closeTextoidHint : using "set selectedText of window MyWindow to 32000" places the insertion point at the end of the text.   Like any XWindow, Textoid has properties that can be get and set thru HyperTalk.   ΓÇ£properties of window "Textoid"ΓÇ¥ will return an item list of all allowed properties :   ΓÇó loc             : windoid's position according to card   ΓÇó visible       : windoid's visibility   ΓÇó text          : windoid's text   ΓÇó rect          : windoid's position and size according to card   ΓÇó textFont    : windoid's font   ΓÇó textSize    : windoid's font size   ΓÇó globalLoc   : windoid's position according to screen   ΓÇó globalRect : windoid's position and size according to screen   ΓÇó textAlign  : windoid's text alignment (left,right,center)   ΓÇó textStyle  : windoid's text style (bold, italic, outline, underline,                          shadow, condense, extend)   ΓÇó hScroll      : horizontal scroll value (in pixels)   ΓÇó vScroll      : vertical scroll value (in lines)   ΓÇó zoom         : zoomed state (in, out)   ΓÇó foreColor  : text color (black, white, blue, red, yellow, cyan, magenta,                         green) or (red green blue)   ΓÇó backColor : back color (black, white, blue, red, yellow, cyan, magenta,                         green) or (red green blue)   ΓÇó lockText   : text locking (true or false)   ΓÇó selectedText: current selection (Start[,Stop])If an error occurs, external can return :     "Error : Missing window name"     "Error : Text cannot exceed 32000 chars"     "Error : Unrecognized parameter"     "Error : Duplicate window name"     "Error : Empty parameter"     "Error : Window rect defined twice"     "Error : Window loc defined twice"     "Error : Text wrap defined twice"     "Error : Font size defined twice"     "Error : Font name defined twice"     "Error : Font style defined twice"     "Error : Font alignment defined twice"     "Error : Bad text style"     "Error : Unable to create XWindow"     "Error : XWindows not implemented"VERSIONS HISTORY-----------------1.8 :ΓÇó Added window style parameterΓÇó Added "openTextoid" messageΓÇó Fixed rect/globalRect property to not show window if invisibleΓÇó Added support of Rinaldoid WDEF and CDEF1.6 :ΓÇó Window title is displayedΓÇó All RBG values available for colorΓÇó Added "closeTextoid" message when closing windowΓÇó Fixed minor bugsΓÇó Added "selectedText" propertyΓÇó Added command-A shortcut1.5 :ΓÇó full text editing added.1.4 : ΓÇó┬áfixed a bug arising on CPUs with no Color QuickDraw1.3 :ΓÇó Added color support1.2 :ΓÇó fixed word hilighting with wrapping word1.1 :ΓÇó fixed visual minor bugs (color GrowBox, multi-screen grow frame)ΓÇó added hyperText capabilitiesΓÇó added properties : globalLoc,globalRect,textAlign,textStyle,hScroll,   vScroll,zoom--------------------------------------------------------------------This (these) external(s) is (are) FreeWare,allowing unlimited use in any non-commercial stack. You just need in this case to mention the author's name and copyright in your stack.Any commercial use must be licensed and aknowledged by the author.                                  ┬⌐ F. Rinaldi - 1989,1990AppleLink: RINALDI1        CalvaCom : FR10        Compuserve : 71170,2111</text>
  80.     </content>
  81.     <name></name>
  82.     <script>on ClicInText What,Whereput "You clicked on ΓÇ£" & What & "ΓÇ¥ in window ΓÇ£" & Where & "ΓÇ¥"end ClicInTexton closeTextoid Whatput "You closed window ΓÇ£" & What & "ΓÇ¥"end closeTextoid</script>
  83. </card>
  84.  
  85.  
  86.